<?php

namespace app\common\model\user;

use app\common\model\BaseModel;

/**
 * 等级产品
 */
class GradeProductLog extends BaseModel
{
    protected $name = 'user_grade_product_log';
    protected $autoWriteTimestamp = true;

    public function grade()
    {
        return $this->belongsTo('app\common\model\user\Grade', 'grade_id', 'grade_id');
    }

    public function product()
    {
        return $this->belongsTo('app\common\model\product\Product', 'product_id', 'product_id');
    }

    public function user()
    {
        return $this->belongsTo('app\common\model\user\User', 'user_id', 'user_id');
    }
}